package cn.xyy.common.spring;

import cn.xyy.common.config.FileConfig;
import cn.xyy.common.config.AppConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 通用实例化bean
 * 
 * @author xyy
 *
 */
@Configuration
public class CommonBeanRegister {

	@Bean
	@ConfigurationProperties(prefix = "xyyadmin.file")
	public FileConfig getFileConfig() {
		return new FileConfig();
	}

	@Bean
	@ConfigurationProperties(prefix = "xyyadmin.app")
	public AppConfig getAppConfig() {
		return new AppConfig();
	}

}
